package com.work.example.demo5.controller;

import com.work.example.demo5.service.AuthorService;
import com.work.example.demo5.service.PressService;
import com.work.example.demo5.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@CrossOrigin
@RestController
@RequestMapping("/press")
public class PressController {
    @Autowired
    private PressService pressService;
    @GetMapping("/getpresses")
    public R getAuthors() {
        return R.success(pressService.list());
    }

}
